/* **********************************************************************************
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* **********************************************************************************/

using System;
using System.Collections.Generic;
using System.Text;

namespace OfficeOpenXMLInterop
{
    #region Simple Types

    /// <summary>
    /// Blend mode
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public enum ST_BlendMode
    {
        over,
        mult,
        screen,
        darken,
        lighten,
    }

    /// <summary>
    /// Effect container type
    /// </summary>
    [Serializable]
    public enum ST_EffectContainerType
    {
        sib,
        tree,
    }

    /// <summary>
    /// Preset patterns
    /// </summary>
    [Serializable]
    public enum ST_PresetPatternVal
    {
        pct5,
        pct10,
        pct20,
        pct25,
        pct30,
        pct40,
        pct50,
        pct60,
        pct70,
        pct75,
        pct80,
        pct90,
        horz,
        vert,
        ltHorz,
        ltVert,
        dkHorz,
        dkVert,
        narHorz,
        narVert,
        dashHorz,
        dashVert,
        cross,
        dnDiag,
        upDiag,
        ltDnDiag,
        ltUpDiag,
        dkDnDiag,
        dkUpDiag,
        wdDnDiag,
        wdUpDiag,
        dashDnDiag,
        dashUpDiag,
        diagCross,
        smCheck,
        lgCheck,
        smGrid,
        lgGrid,
        dotGrid,
        smConfetti,
        lgConfetti,
        horzBrick,
        diagBrick,
        solidDmnd,
        openDmnd,
        dotDmnd,
        plaid,
        sphere,
        weave,
        divot,
        shingle,
        wave,
        trellis,
        zigZag,
    }

    /// <summary>
    /// Image compression type
    /// </summary>
    [Serializable]
    public enum ST_BlipCompression
    {
        email,
        screen,
        print,
        hqprint,
        none,
    }

    /// <summary>
    /// Preset shadow types
    /// </summary>
    [Serializable]
    public enum ST_PresetShadowVal
    {
        shdw1,
        shdw2,
        shdw3,
        shdw4,
        shdw5,
        shdw6,
        shdw7,
        shdw8,
        shdw9,
        shdw10,
        shdw11,
        shdw12,
        shdw13,
        shdw14,
        shdw15,
        shdw16,
        shdw17,
        shdw18,
        shdw19,
        shdw20,
    }

    /// <summary>
    /// Path shade type
    /// </summary>
    [Serializable]
    public enum ST_PathShadeType
    {
        shape,
        circle,
        rect,
    }

    /// <summary>
    /// Tile flip mode
    /// </summary>
    [Serializable]
    public enum ST_TileFlipMode
    {
        none,
        x,
        y,
        xy,
    }

    #endregion

    #region Complex Types

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_AlphaBiLevelEffect
    {
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int thresh;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_AlphaCeilingEffect
    {
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_AlphaFloorEffect
    {
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_AlphaInverseEffect
    {
        public CT_ScRgbColor scrgbClr;
        public CT_SRgbColor srgbClr;
        public CT_HslColor hslClr;
        public CT_SystemColor sysClr;
        public CT_SchemeColor schemeClr;
        public CT_PresetColor prstClr;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_AlphaModulateFixedEffect
    {
        public CT_AlphaModulateFixedEffect()
        {
            this.amt = 100000;
        }

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(100000)]
        public int amt;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_AlphaOutsetEffect
    {
        public CT_AlphaOutsetEffect()
        {
            this.rad = ((long)(0));
        }

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(typeof(long), "0")]
        public long rad;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_AlphaReplaceEffect
    {
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int a;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_BiLevelEffect
    {
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int thresh;
    }

    /// <summary>
    /// Blur effect
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_BlurEffect
    {
        public CT_BlurEffect()
        {
            this.rad = ((long)(0));
            this.grow = true;
        }

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(typeof(long), "0")]
        public long rad;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(true)]
        public bool grow;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_ColorChangeEffect
    {
        public CT_ColorChangeEffect()
        {
            this.useA = true;
        }

        public CT_Color clrFrom;

        public CT_Color clrTo;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(true)]
        public bool useA;
    }
    
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_ColorReplaceEffect
    {
        public CT_ScRgbColor scrgbClr;
        public CT_SRgbColor srgbClr;
        public CT_HslColor hslClr;
        public CT_SystemColor sysClr;
        public CT_SchemeColor schemeClr;
        public CT_PresetColor prstClr;
    }

    /// <summary>
    /// Duotone effect, there should be two and only two items held within Items
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_DuotoneEffect
    {
        [System.Xml.Serialization.XmlElementAttribute("scrgbClr", typeof(CT_ScRgbColor))]
        [System.Xml.Serialization.XmlElementAttribute("srgbClr", typeof(CT_SRgbColor))]
        [System.Xml.Serialization.XmlElementAttribute("hslClr", typeof(CT_HslColor))]
        [System.Xml.Serialization.XmlElementAttribute("sysClr", typeof(CT_SystemColor))]
        [System.Xml.Serialization.XmlElementAttribute("schemeClr", typeof(CT_SchemeColor))]
        [System.Xml.Serialization.XmlElementAttribute("prstClr", typeof(CT_PresetColor))]
        public object[] Items;
    }

    /// <summary>
    /// Glow effect
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_GlowEffect
    {
        public CT_GlowEffect()
        {
            this.rad = ((long)(50800));
        }

        public override string ToString()
        {
            return "Glow";
        }

        public CT_ScRgbColor scrgbClr;
        public CT_SRgbColor srgbClr;
        public CT_HslColor hslClr;
        public CT_SystemColor sysClr;
        public CT_SchemeColor schemeClr;
        public CT_PresetColor prstClr;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(typeof(long), "0")]
        public long rad;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_GrayscaleEffect
    {
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_HSLEffect
    {
        public CT_HSLEffect()
        {
            this.hue = 0;
            this.sat = 0;
            this.lum = 0;
        }

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int hue;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int sat;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int lum;
    }

    /// <summary>
    /// Inner shadow effect
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_InnerShadowEffect
    {
        public CT_InnerShadowEffect()
        {
            this.blurRad = ((long)(50800));
            this.dist = ((long)(25400));
            this.dir = 13500000;
        }

        public override string ToString()
        {
            return "Inner Shadow";
        }

        public CT_ScRgbColor scrgbClr;
        public CT_SRgbColor srgbClr;
        public CT_HslColor hslClr;
        public CT_SystemColor sysClr;
        public CT_SchemeColor schemeClr;
        public CT_PresetColor prstClr;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(typeof(long), "0")]
        public long blurRad;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(typeof(long), "0")]
        public long dist;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int dir;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_LuminanceEffect
    {
        public CT_LuminanceEffect()
        {
            this.bright = 0;
            this.contrast = 0;
        }

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int bright;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int contrast;
    }

    /// <summary>
    /// Outser shadow effect
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_OuterShadowEffect
    {
        public CT_OuterShadowEffect()
        {
            this.blurRad = ((long)(38100));
            this.dist = ((long)(25400));
            this.dir = 5400000;
            this.sx = 100000;
            this.sy = 100000;
            this.kx = 0;
            this.ky = 0;
            this.algn = ST_RectAlignment.b;
            this.rotWithShape = false;
        }

        public override string ToString()
        {
            return "Outer Shadow";
        }

        public CT_ScRgbColor scrgbClr;
        public CT_SRgbColor srgbClr;
        public CT_HslColor hslClr;
        public CT_SystemColor sysClr;
        public CT_SchemeColor schemeClr;
        public CT_PresetColor prstClr;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(typeof(long), "0")]
        public long blurRad;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(typeof(long), "0")]
        public long dist;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int dir;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(100000)]
        public int sx;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(100000)]
        public int sy;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int kx;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int ky;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(ST_RectAlignment.b)]
        public ST_RectAlignment algn;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(true)]
        public bool rotWithShape;
    }

    /// <summary>
    /// Preset shadow effect
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_PresetShadowEffect
    {
        public CT_PresetShadowEffect()
        {
            this.dist = ((long)(0));
            this.dir = 0;
        }

        public CT_ScRgbColor scrgbClr;
        public CT_SRgbColor srgbClr;
        public CT_HslColor hslClr;
        public CT_SystemColor sysClr;
        public CT_SchemeColor schemeClr;
        public CT_PresetColor prstClr;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public ST_PresetShadowVal prst;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(typeof(long), "0")]
        public long dist;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int dir;
    }

    /// <summary>
    /// Reflection effect
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_ReflectionEffect
    {
        public CT_ReflectionEffect()
        {
            this.blurRad = ((long)(12700));
            this.stA = 26000;
            this.stPos = 0;
            this.endA = 0;
            this.endPos = 28000;
            this.dist = ((long)(38100));
            this.dir = 5400000;
            this.fadeDir = 5400000;
            this.sx = 100000;
            this.sy = -100000;
            this.kx = 0;
            this.ky = 0;
            this.algn = ST_RectAlignment.b;
            this.rotWithShape = false;
        }

        public override string ToString()
        {
            return "Reflection";
        }

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(typeof(long), "0")]
        public long blurRad;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(100000)]
        public int stA;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int stPos;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int endA;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(100000)]
        public int endPos;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(typeof(long), "0")]
        public long dist;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int dir;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(5400000)]
        public int fadeDir;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(100000)]
        public int sx;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(100000)]
        public int sy;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int kx;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int ky;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(ST_RectAlignment.b)]
        public ST_RectAlignment algn;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(true)]
        public bool rotWithShape;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_RelativeOffsetEffect
    {
        public CT_RelativeOffsetEffect()
        {
            this.tx = 0;
            this.ty = 0;
        }

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int tx;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int ty;
    }

    /// <summary>
    /// Soft edge effect
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_SoftEdgesEffect
    {
        public CT_SoftEdgesEffect()
        {
            this.rad = ((long)(127000));
        }

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public long rad;

        public override string ToString()
        {
            return "Soft Edges";
        }
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_TintEffect
    {
        public CT_TintEffect()
        {
            this.hue = 0;
            this.amt = 0;
        }

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int hue;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int amt;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_TransformEffect
    {
        public CT_TransformEffect()
        {
            this.sx = 100000;
            this.sy = 100000;
            this.kx = 0;
            this.ky = 0;
            this.tx = ((long)(0));
            this.ty = ((long)(0));
        }

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(100000)]
        public int sx;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(100000)]
        public int sy;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int kx;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(0)]
        public int ky;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(typeof(long), "0")]
        public long tx;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(typeof(long), "0")]
        public long ty;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_NoFillProperties
    {
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_SolidColorFillProperties
    {
        public CT_ScRgbColor scrgbClr;
        public CT_SRgbColor srgbClr;
        public CT_HslColor hslClr;
        public CT_SystemColor sysClr;
        public CT_SchemeColor schemeClr;
        public CT_PresetColor prstClr;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_LinearShadeProperties
    {
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int ang;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool angSpecified;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public bool scaled;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool scaledSpecified;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_PathShadeProperties
    {
        public CT_RelativeRect fillToRect;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public ST_PathShadeType path;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool pathSpecified;
    }

    /// <summary>
    /// Gradient stop
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_GradientStop
    {
        public CT_ScRgbColor scrgbClr;
        public CT_SRgbColor srgbClr;
        public CT_HslColor hslClr;
        public CT_SystemColor sysClr;
        public CT_SchemeColor schemeClr;
        public CT_PresetColor prstClr;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int pos;
    }

    /// <summary>
    /// Gradient Fill Properties
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_GradientFillProperties
    {
        [System.Xml.Serialization.XmlArrayItemAttribute("gs", IsNullable = false)]
        public CT_GradientStop[] gsLst;

        public CT_LinearShadeProperties lin;

        public CT_PathShadeProperties path;

        public CT_RelativeRect tileRect;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public ST_TileFlipMode flip;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool flipSpecified;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValue(false)]
        public bool rotWithShape;
    }


    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_TileInfoProperties
    {
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public long tx;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool txSpecified;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public long ty;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool tySpecified;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int sx;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool sxSpecified;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int sy;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool sySpecified;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public ST_TileFlipMode flip;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool flipSpecified;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public ST_RectAlignment algn;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool algnSpecified;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_StretchInfoProperties
    {
        public CT_RelativeRect fillRect;
    }

    /// <summary>
    /// Image
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    [System.Xml.Serialization.XmlRootAttribute("blip", Namespace = Namespaces.DrawingMLMain, IsNullable = false)]
    public class CT_Blip
    {
        public CT_Blip()
        {
            this.embed = "";
            this.link = "";
            this.cstate = ST_BlipCompression.none;
        }

        [System.Xml.Serialization.XmlElementAttribute("alphaBiLevel", typeof(CT_AlphaBiLevelEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaCeiling", typeof(CT_AlphaCeilingEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaFloor", typeof(CT_AlphaFloorEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaInv", typeof(CT_AlphaInverseEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaMod", typeof(CT_AlphaModulateEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaModFix", typeof(CT_AlphaModulateFixedEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaRepl", typeof(CT_AlphaReplaceEffect))]
        [System.Xml.Serialization.XmlElementAttribute("biLevel", typeof(CT_BiLevelEffect))]
        [System.Xml.Serialization.XmlElementAttribute("blur", typeof(CT_BlurEffect))]
        [System.Xml.Serialization.XmlElementAttribute("clrChange", typeof(CT_ColorChangeEffect))]
        [System.Xml.Serialization.XmlElementAttribute("clrRepl", typeof(CT_ColorReplaceEffect))]
        [System.Xml.Serialization.XmlElementAttribute("duotone", typeof(CT_DuotoneEffect))]
        [System.Xml.Serialization.XmlElementAttribute("fillOverlay", typeof(CT_FillOverlayEffect))]
        [System.Xml.Serialization.XmlElementAttribute("grayscl", typeof(CT_GrayscaleEffect))]
        [System.Xml.Serialization.XmlElementAttribute("hsl", typeof(CT_HSLEffect))]
        [System.Xml.Serialization.XmlElementAttribute("lum", typeof(CT_LuminanceEffect))]
        [System.Xml.Serialization.XmlElementAttribute("tint", typeof(CT_TintEffect))]
        public object[] Items;

        [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = Namespaces.Rel)]
        [System.ComponentModel.DefaultValueAttribute("")]
        public string embed;

        [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = Namespaces.Rel)]
        [System.ComponentModel.DefaultValueAttribute("")]
        public string link;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(ST_BlipCompression.none)]
        public ST_BlipCompression cstate;
    }

    /// <summary>
    /// Image fill properties
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_BlipFillProperties
    {
        public CT_Blip blip;

        public CT_RelativeRect srcRect;

        public CT_TileInfoProperties tile;

        public CT_StretchInfoProperties stretch;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public uint dpi;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool dpiSpecified;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValue(false)]
        public bool rotWithShape;
    }

    /// <summary>
    /// Pattern fill properties
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_PatternFillProperties
    {
        public CT_Color fgClr;

        public CT_Color bgClr;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public ST_PresetPatternVal prst;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool prstSpecified;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_GroupFillProperties
    {
    }

    /// <summary>
    ///  Fill effect
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_FillEffect
    {
        private CT_NoFillProperties _noFill;
        private CT_SolidColorFillProperties _solidFill;
        private CT_GradientFillProperties _gradFill;
        private CT_BlipFillProperties _blipFill;
        private CT_PatternFillProperties _pattFill;
        private CT_GroupFillProperties _grpFill;

        private void SetValue(object value)
        {
            // Zero out anything set
            this._noFill = null;
            this._solidFill = null;
            this._gradFill = null;
            this._blipFill = null;
            this._pattFill = null;
            this._grpFill = null;

            // Set the actual value
            if (value.GetType() == typeof(CT_NoFillProperties))
            {
                this._noFill = (CT_NoFillProperties)value;
            }
            else if (value.GetType() == typeof(CT_SolidColorFillProperties))
            {
                this._solidFill = (CT_SolidColorFillProperties)value;
            }
            else if (value.GetType() == typeof(CT_GradientFillProperties))
            {
                this._gradFill = (CT_GradientFillProperties)value;
            }
            else if (value.GetType() == typeof(CT_BlipFillProperties))
            {
                this._blipFill = (CT_BlipFillProperties)value;
            }
            else if (value.GetType() == typeof(CT_PatternFillProperties))
            {
                this._pattFill = (CT_PatternFillProperties)value;
            }
            else if (value.GetType() == typeof(CT_GroupFillProperties))
            {
                this._grpFill = (CT_GroupFillProperties)value;
            }
        }

        public CT_NoFillProperties noFill
        {
            get { return this._noFill; }
            set { this.SetValue(value); }
        }

        public CT_SolidColorFillProperties solidFill
        {
            get { return this._solidFill; }
            set { this.SetValue(value); }
        }

        public CT_GradientFillProperties gradFill
        {
            get { return this._gradFill; }
            set { this.SetValue(value); }
        }

        public CT_BlipFillProperties blipFill
        {
            get { return this._blipFill; }
            set { this.SetValue(value); }
        }

        public CT_PatternFillProperties pattFill
        {
            get { return this._pattFill; }
            set { this.SetValue(value); }
        }

        public CT_GroupFillProperties grpFill
        {
            get { return this._grpFill; }
            set { this.SetValue(value); }
        }
    }

    /// <summary>
    /// Fill overlay effect
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_FillOverlayEffect
    {
        public CT_NoFillProperties noFill;
        public CT_SolidColorFillProperties solidFill;
        public CT_GradientFillProperties gradFill;
        public CT_BlipFillProperties blipFill;
        public CT_PatternFillProperties pattFill;
        public CT_GroupFillProperties grpFill;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public ST_BlendMode blend;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_EffectReference
    {
        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "token")]
        public string @ref;
    }

    /// <summary>
    /// Effect container
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_EffectContainer
    {
        public CT_EffectContainer()
        {
            this.type = ST_EffectContainerType.sib;
        }

        [System.Xml.Serialization.XmlElementAttribute("alphaBiLevel", typeof(CT_AlphaBiLevelEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaCeiling", typeof(CT_AlphaCeilingEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaFloor", typeof(CT_AlphaFloorEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaInv", typeof(CT_AlphaInverseEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaMod", typeof(CT_AlphaModulateEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaModFix", typeof(CT_AlphaModulateFixedEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaOutset", typeof(CT_AlphaOutsetEffect))]
        [System.Xml.Serialization.XmlElementAttribute("alphaRepl", typeof(CT_AlphaReplaceEffect))]
        [System.Xml.Serialization.XmlElementAttribute("biLevel", typeof(CT_BiLevelEffect))]
        [System.Xml.Serialization.XmlElementAttribute("blend", typeof(CT_BlendEffect))]
        [System.Xml.Serialization.XmlElementAttribute("blur", typeof(CT_BlurEffect))]
        [System.Xml.Serialization.XmlElementAttribute("clrChange", typeof(CT_ColorChangeEffect))]
        [System.Xml.Serialization.XmlElementAttribute("clrRepl", typeof(CT_ColorReplaceEffect))]
        [System.Xml.Serialization.XmlElementAttribute("cont", typeof(CT_EffectContainer))]
        [System.Xml.Serialization.XmlElementAttribute("duotone", typeof(CT_DuotoneEffect))]
        [System.Xml.Serialization.XmlElementAttribute("effect", typeof(CT_EffectReference))]
        [System.Xml.Serialization.XmlElementAttribute("fill", typeof(CT_FillEffect))]
        [System.Xml.Serialization.XmlElementAttribute("fillOverlay", typeof(CT_FillOverlayEffect))]
        [System.Xml.Serialization.XmlElementAttribute("glow", typeof(CT_GlowEffect))]
        [System.Xml.Serialization.XmlElementAttribute("grayscl", typeof(CT_GrayscaleEffect))]
        [System.Xml.Serialization.XmlElementAttribute("hsl", typeof(CT_HSLEffect))]
        [System.Xml.Serialization.XmlElementAttribute("innerShdw", typeof(CT_InnerShadowEffect))]
        [System.Xml.Serialization.XmlElementAttribute("lum", typeof(CT_LuminanceEffect))]
        [System.Xml.Serialization.XmlElementAttribute("outerShdw", typeof(CT_OuterShadowEffect))]
        [System.Xml.Serialization.XmlElementAttribute("prstShdw", typeof(CT_PresetShadowEffect))]
        [System.Xml.Serialization.XmlElementAttribute("reflection", typeof(CT_ReflectionEffect))]
        [System.Xml.Serialization.XmlElementAttribute("relOff", typeof(CT_RelativeOffsetEffect))]
        [System.Xml.Serialization.XmlElementAttribute("softEdge", typeof(CT_SoftEdgesEffect))]
        [System.Xml.Serialization.XmlElementAttribute("tint", typeof(CT_TintEffect))]
        [System.Xml.Serialization.XmlElementAttribute("xfrm", typeof(CT_TransformEffect))]
        public object[] Items;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(ST_EffectContainerType.sib)]
        public ST_EffectContainerType type;

        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "token")]
        public string name;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_AlphaModulateEffect
    {
        public CT_EffectContainer cont;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_BlendEffect
    {
        public CT_EffectContainer cont;
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public ST_BlendMode blend;
    }

    /// <summary>
    /// Effect list
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_EffectList
    {
        public CT_BlurEffect blur;
        public CT_FillOverlayEffect fillOverlay;
        public CT_GlowEffect glow;
        public CT_InnerShadowEffect innerShdw;
        public CT_OuterShadowEffect outerShdw;
        public CT_PresetShadowEffect prstShdw;
        public CT_ReflectionEffect reflection;
        public CT_SoftEdgesEffect softEdge;
    }

    #endregion
}
